package com.zsxb.crm.service;

import com.zsxb.crm.dto.BusinessDTO;
import com.zsxb.crm.dto.BusinessPoolDTO;
import com.zsxb.crm.dto.BusinessRecordDTO;
import com.zsxb.crm.dto.ClueGainDTO;
import com.zsxb.crm.pojo.Business;
import com.zsxb.crm.result.PageResult;
import com.zsxb.crm.vo.RecordVO;

import java.util.List;

public interface BusinessService {
    //商家分页查询
    PageResult pageQuery(BusinessDTO businessDTO);
    //根据id查询商家
    Business getById(Long businessId);

    /**
     * 新增商机
     * @param business
     */
    void addBusiness(Business business);

    /**
     * 踢回公海
     * @param businessId
     * @param reasonValue
     */
    void backSea(Long businessId, Integer reasonValue);

    /**
     * 商机公海分页查询
     * @param businessPoolDTO
     * @return
     */
    PageResult poolPageQuery(BusinessPoolDTO businessPoolDTO);

    /**
     * 商机详情新增
     *
     * @param business
     * @param businessRecordDTO
     */
    void addBusinessDetail(BusinessRecordDTO businessRecordDTO);

    /**
     * 分配商机
     * @param business
     */
    void assign(ClueGainDTO business);

    /**
     * 根据商机id查询商机跟踪报告
     *
     * @param businessId
     * @return
     */
    List<RecordVO> findRecordByBusinessId(Long businessId);

    /**
     * 捞取公海商机
     */
    void gainBusiness(ClueGainDTO clueGainDTO);
}
